3.106 \(\int \frac {2 a-x^2}{a^2-a x^2+x^4} \, dx\)
Optimal. Leaf size=114 \[ -\frac {\sqrt {3} \log \left (-\sqrt {3} \sqrt {a} x+a+x^2\right )}{4 \sqrt {a}}+\frac {\sqrt {3} \log \left (\sqrt {3} \sqrt {a} x+a+x^2\right )}{4 \sqrt {a}}-\frac {\tan ^{-1}\left (\sqrt {3}-\frac {2 x}{\sqrt {a}}\right )}{2 \sqrt {a}}+\frac {\tan ^{-1}\left (\frac {2 x}{\sqrt {a}}+\sqrt {3}\right )}{2 \sqrt {a}} \]
[Out]
1/2*arctan(-3^(1/2)+2*x/a^(1/2))/a^(1/2)+1/2*arctan(3^(1/2)+2*x/a^(1/2))/a^(1/2)-1/4*ln(a+x^2-x*3^(1/2)*a^(1/2
))*3^(1/2)/a^(1/2)+1/4*ln(a+x^2+x*3^(1/2)*a^(1/2))*3^(1/2)/a^(1/2)
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 114, normalized size of antiderivative = 1.00,
number of steps used = 9, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used =
{1169, 634, 617, 204, 628} \[ -\frac {\sqrt {3} \log \left (-\sqrt {3} \sqrt {a} x+a+x^2\right )}{4 \sqrt {a}}+\frac {\sqrt {3} \log \left (\sqrt {3} \sqrt {a} x+a+x^2\right )}{4 \sqrt {a}}-\frac {\tan ^{-1}\left (\sqrt {3}-\frac {2 x}{\sqrt {a}}\right )}{2 \sqrt {a}}+\frac {\tan ^{-1}\left (\frac {2 x}{\sqrt {a}}+\sqrt {3}\right )}{2 \sqrt {a}} \]
Antiderivative was successfully verified.
[In]
Int[(2*a - x^2)/(a^2 - a*x^2 + x^4),x]
[Out]
-ArcTan[Sqrt[3] - (2*x)/Sqrt[a]]/(2*Sqrt[a]) + ArcTan[Sqrt[3] + (2*x)/Sqrt[a]]/(2*Sqrt[a]) - (Sqrt[3]*Log[a -
Sqrt[3]*Sqrt[a]*x + x^2])/(4*Sqrt[a]) + (Sqrt[3]*Log[a + Sqrt[3]*Sqrt[a]*x + x^2])/(4*Sqrt[a])
Rule 204
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])
Rule 617
Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] || !RationalQ[b^2 - 4*a*c])] /;
FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]
Rule 628
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Rule 634
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && !NiceSqrtQ[b^2 - 4*a*c]
Rule 1169
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r =
Rt[2*q - b/c, 2]}, Dist[1/(2*c*q*r), Int[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(
d*r + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2
- b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]
Rubi steps
\begin {align*} \int \frac {2 a-x^2}{a^2-a x^2+x^4} \, dx &=\frac {\int \frac {2 \sqrt {3} a^{3/2}-3 a x}{a-\sqrt {3} \sqrt {a} x+x^2} \, dx}{2 \sqrt {3} a^{3/2}}+\frac {\int \frac {2 \sqrt {3} a^{3/2}+3 a x}{a+\sqrt {3} \sqrt {a} x+x^2} \, dx}{2 \sqrt {3} a^{3/2}}\\ &=\frac {1}{4} \int \frac {1}{a-\sqrt {3} \sqrt {a} x+x^2} \, dx+\frac {1}{4} \int \frac {1}{a+\sqrt {3} \sqrt {a} x+x^2} \, dx-\frac {\sqrt {3} \int \frac {-\sqrt {3} \sqrt {a}+2 x}{a-\sqrt {3} \sqrt {a} x+x^2} \, dx}{4 \sqrt {a}}+\frac {\sqrt {3} \int \frac {\sqrt {3} \sqrt {a}+2 x}{a+\sqrt {3} \sqrt {a} x+x^2} \, dx}{4 \sqrt {a}}\\ &=-\frac {\sqrt {3} \log \left (a-\sqrt {3} \sqrt {a} x+x^2\right )}{4 \sqrt {a}}+\frac {\sqrt {3} \log \left (a+\sqrt {3} \sqrt {a} x+x^2\right )}{4 \sqrt {a}}+\frac {\operatorname {Subst}\left (\int \frac {1}{-\frac {1}{3}-x^2} \, dx,x,1-\frac {2 x}{\sqrt {3} \sqrt {a}}\right )}{2 \sqrt {3} \sqrt {a}}-\frac {\operatorname {Subst}\left (\int \frac {1}{-\frac {1}{3}-x^2} \, dx,x,1+\frac {2 x}{\sqrt {3} \sqrt {a}}\right )}{2 \sqrt {3} \sqrt {a}}\\ &=-\frac {\tan ^{-1}\left (\sqrt {3}-\frac {2 x}{\sqrt {a}}\right )}{2 \sqrt {a}}+\frac {\tan ^{-1}\left (\sqrt {3}+\frac {2 x}{\sqrt {a}}\right )}{2 \sqrt {a}}-\frac {\sqrt {3} \log \left (a-\sqrt {3} \sqrt {a} x+x^2\right )}{4 \sqrt {a}}+\frac {\sqrt {3} \log \left (a+\sqrt {3} \sqrt {a} x+x^2\right )}{4 \sqrt {a}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.17, size = 115, normalized size = 1.01 \[ \frac {\sqrt [4]{-1} \left (\sqrt {\sqrt {3}-i} \left (\sqrt {3}-3 i\right ) \tanh ^{-1}\left (\frac {(1+i) x}{\sqrt {\sqrt {3}+i} \sqrt {a}}\right )-\sqrt {\sqrt {3}+i} \left (\sqrt {3}+3 i\right ) \tan ^{-1}\left (\frac {(1+i) x}{\sqrt {\sqrt {3}-i} \sqrt {a}}\right )\right )}{2 \sqrt {6} \sqrt {a}} \]
Antiderivative was successfully verified.
[In]
Integrate[(2*a - x^2)/(a^2 - a*x^2 + x^4),x]
[Out]
((-1)^(1/4)*(-(Sqrt[I + Sqrt[3]]*(3*I + Sqrt[3])*ArcTan[((1 + I)*x)/(Sqrt[-I + Sqrt[3]]*Sqrt[a])]) + Sqrt[-I +
Sqrt[3]]*(-3*I + Sqrt[3])*ArcTanh[((1 + I)*x)/(Sqrt[I + Sqrt[3]]*Sqrt[a])]))/(2*Sqrt[6]*Sqrt[a])
________________________________________________________________________________________
fricas [B] time = 0.43, size = 517, normalized size = 4.54 \[ \frac {1}{24} \, {\left (\sqrt {3} a \sqrt {\frac {1}{a^{2}}} + 2 \, \sqrt {3}\right )} \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {1}{4}} \log \left (6 \, a^{2} \sqrt {\frac {1}{a^{2}}} + 6 \, x^{2} + {\left (\sqrt {3} a^{2} \sqrt {\frac {1}{a^{2}}} x + 2 \, \sqrt {3} a x\right )} \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {1}{4}}\right ) - \frac {1}{24} \, {\left (\sqrt {3} a \sqrt {\frac {1}{a^{2}}} + 2 \, \sqrt {3}\right )} \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {1}{4}} \log \left (6 \, a^{2} \sqrt {\frac {1}{a^{2}}} + 6 \, x^{2} - {\left (\sqrt {3} a^{2} \sqrt {\frac {1}{a^{2}}} x + 2 \, \sqrt {3} a x\right )} \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {1}{4}}\right ) - \frac {1}{2} \, \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {1}{4}} \arctan \left (\frac {1}{18} \, {\left (\sqrt {6} a^{2} \sqrt {\frac {1}{a^{2}}} + 2 \, \sqrt {6} a\right )} \sqrt {6 \, a^{2} \sqrt {\frac {1}{a^{2}}} + 6 \, x^{2} + {\left (\sqrt {3} a^{2} \sqrt {\frac {1}{a^{2}}} x + 2 \, \sqrt {3} a x\right )} \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {1}{4}}} \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {3}{4}} - \frac {1}{3} \, {\left (a^{2} \sqrt {\frac {1}{a^{2}}} x + 2 \, a x\right )} \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {3}{4}} - \frac {1}{3} \, \sqrt {3} a \sqrt {\frac {1}{a^{2}}} - \frac {2}{3} \, \sqrt {3}\right ) - \frac {1}{2} \, \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {1}{4}} \arctan \left (\frac {1}{18} \, {\left (\sqrt {6} a^{2} \sqrt {\frac {1}{a^{2}}} + 2 \, \sqrt {6} a\right )} \sqrt {6 \, a^{2} \sqrt {\frac {1}{a^{2}}} + 6 \, x^{2} - {\left (\sqrt {3} a^{2} \sqrt {\frac {1}{a^{2}}} x + 2 \, \sqrt {3} a x\right )} \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {1}{4}}} \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {3}{4}} - \frac {1}{3} \, {\left (a^{2} \sqrt {\frac {1}{a^{2}}} x + 2 \, a x\right )} \sqrt {-4 \, a \sqrt {\frac {1}{a^{2}}} + 8} \frac {1}{a^{2}}^{\frac {3}{4}} + \frac {1}{3} \, \sqrt {3} a \sqrt {\frac {1}{a^{2}}} + \frac {2}{3} \, \sqrt {3}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((-x^2+2*a)/(x^4-a*x^2+a^2),x, algorithm="fricas")
[Out]
1/24*(sqrt(3)*a*sqrt(a^(-2)) + 2*sqrt(3))*sqrt(-4*a*sqrt(a^(-2)) + 8)*(a^(-2))^(1/4)*log(6*a^2*sqrt(a^(-2)) +
6*x^2 + (sqrt(3)*a^2*sqrt(a^(-2))*x + 2*sqrt(3)*a*x)*sqrt(-4*a*sqrt(a^(-2)) + 8)*(a^(-2))^(1/4)) - 1/24*(sqrt(
3)*a*sqrt(a^(-2)) + 2*sqrt(3))*sqrt(-4*a*sqrt(a^(-2)) + 8)*(a^(-2))^(1/4)*log(6*a^2*sqrt(a^(-2)) + 6*x^2 - (sq
rt(3)*a^2*sqrt(a^(-2))*x + 2*sqrt(3)*a*x)*sqrt(-4*a*sqrt(a^(-2)) + 8)*(a^(-2))^(1/4)) - 1/2*sqrt(-4*a*sqrt(a^(
-2)) + 8)*(a^(-2))^(1/4)*arctan(1/18*(sqrt(6)*a^2*sqrt(a^(-2)) + 2*sqrt(6)*a)*sqrt(6*a^2*sqrt(a^(-2)) + 6*x^2
+ (sqrt(3)*a^2*sqrt(a^(-2))*x + 2*sqrt(3)*a*x)*sqrt(-4*a*sqrt(a^(-2)) + 8)*(a^(-2))^(1/4))*sqrt(-4*a*sqrt(a^(-
2)) + 8)*(a^(-2))^(3/4) - 1/3*(a^2*sqrt(a^(-2))*x + 2*a*x)*sqrt(-4*a*sqrt(a^(-2)) + 8)*(a^(-2))^(3/4) - 1/3*sq
rt(3)*a*sqrt(a^(-2)) - 2/3*sqrt(3)) - 1/2*sqrt(-4*a*sqrt(a^(-2)) + 8)*(a^(-2))^(1/4)*arctan(1/18*(sqrt(6)*a^2*
sqrt(a^(-2)) + 2*sqrt(6)*a)*sqrt(6*a^2*sqrt(a^(-2)) + 6*x^2 - (sqrt(3)*a^2*sqrt(a^(-2))*x + 2*sqrt(3)*a*x)*sqr
t(-4*a*sqrt(a^(-2)) + 8)*(a^(-2))^(1/4))*sqrt(-4*a*sqrt(a^(-2)) + 8)*(a^(-2))^(3/4) - 1/3*(a^2*sqrt(a^(-2))*x
+ 2*a*x)*sqrt(-4*a*sqrt(a^(-2)) + 8)*(a^(-2))^(3/4) + 1/3*sqrt(3)*a*sqrt(a^(-2)) + 2/3*sqrt(3))
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((-x^2+2*a)/(x^4-a*x^2+a^2),x, algorithm="giac")
[Out]
Exception raised: NotImplementedError >> Unable to parse Giac output: Warning, choosing root of [1,0,%%%{-16,[
2,0]%%%}+%%%{-4,[0,1]%%%},0,%%%{64,[4,0]%%%}+%%%{8,[2,2]%%%}+%%%{16,[2,1]%%%}+%%%{6,[0,2]%%%},0,%%%{-64,[4,2]%
%%}+%%%{-128,[4,1]%%%}+%%%{48,[2,3]%%%}+%%%{16,[2,2]%%%}+%%%{-4,[0,3]%%%},0,%%%{16,[4,4]%%%}+%%%{-64,[4,3]%%%}
+%%%{64,[4,2]%%%}+%%%{8,[2,4]%%%}+%%%{-16,[2,3]%%%}+%%%{1,[0,4]%%%}] at parameters values [16,-63]Warning, cho
osing root of [1,0,%%%{-16,[2,0]%%%}+%%%{-4,[0,1]%%%},0,%%%{64,[4,0]%%%}+%%%{8,[2,2]%%%}+%%%{16,[2,1]%%%}+%%%{
6,[0,2]%%%},0,%%%{-64,[4,2]%%%}+%%%{-128,[4,1]%%%}+%%%{48,[2,3]%%%}+%%%{16,[2,2]%%%}+%%%{-4,[0,3]%%%},0,%%%{16
,[4,4]%%%}+%%%{-64,[4,3]%%%}+%%%{64,[4,2]%%%}+%%%{8,[2,4]%%%}+%%%{-16,[2,3]%%%}+%%%{1,[0,4]%%%}] at parameters
values [39,13]-((-32*a^5-40*a^4*abs(a)+8*sqrt(3)*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/
2/abs(a))/2)))^3-1/12*(-864*sqrt(3)*a^5+864*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(
a))/2)))^2*im(sign(sin(acos(a/2/abs(a))/2)))-1/24*(-2880*sqrt(3)*a^5+1728*a^4*sqrt(5*a^2+4*a*abs(a))-2304*sqrt
(3)*a^4*abs(a))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))^2*re(sign(cos(acos(a/2/abs(a))/2)))-(-72*a^4*ab
s(a)+24*sqrt(3)*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))^2*re(sign(sin(acos(
a/2/abs(a))/2)))-(-72*a^4*abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(
a))/2)))*im(sign(sin(acos(a/2/abs(a))/2)))^2-(-144*a^4*abs(a)+48*sqrt(3)*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(
a))*im(sign(cos(acos(a/2/abs(a))/2)))*im(sign(sin(acos(a/2/abs(a))/2)))*re(sign(cos(acos(a/2/abs(a))/2)))+1/24
*(-3456*sqrt(3)*a^5+3456*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))*im(sign(si
n(acos(a/2/abs(a))/2)))*re(sign(sin(acos(a/2/abs(a))/2)))-(-96*a^5-120*a^4*abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2+4*
a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))*re(sign(cos(acos(a/2/abs(a))/2)))^2+1/24*(-3456*sqrt
(3)*a^5+3456*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))*re(sign(cos(acos(a/2/a
bs(a))/2)))*re(sign(sin(acos(a/2/abs(a))/2)))+(-72*a^4*abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(abs(
a))*im(sign(cos(acos(a/2/abs(a))/2)))*re(sign(sin(acos(a/2/abs(a))/2)))^2+(64*sqrt(3)*a^5-128*a^5-64*a^4*abs(a
))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))+1/8*(-320*sqrt(3)*a^5+192*a^4*sqrt(5*a^2-4*a*abs(a))+256*sqr
t(3)*a^4*abs(a))/sqrt(abs(a))*im(sign(sin(acos(a/2/abs(a))/2)))^3+1/12*(-864*sqrt(3)*a^5+864*a^4*sqrt(5*a^2-4*
a*abs(a)))/sqrt(abs(a))*im(sign(sin(acos(a/2/abs(a))/2)))^2*re(sign(cos(acos(a/2/abs(a))/2)))+(96*a^5-120*a^4*
abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(abs(a))*im(sign(sin(acos(a/2/abs(a))/2)))^2*re(sign(sin(aco
s(a/2/abs(a))/2)))+1/12*(-864*sqrt(3)*a^5+864*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*im(sign(sin(acos(a/2/ab
s(a))/2)))*re(sign(cos(acos(a/2/abs(a))/2)))^2+(-144*a^4*abs(a)+48*sqrt(3)*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(ab
s(a))*im(sign(sin(acos(a/2/abs(a))/2)))*re(sign(cos(acos(a/2/abs(a))/2)))*re(sign(sin(acos(a/2/abs(a))/2)))-1/
24*(-2880*sqrt(3)*a^5+1728*a^4*sqrt(5*a^2-4*a*abs(a))+2304*sqrt(3)*a^4*abs(a))/sqrt(abs(a))*im(sign(sin(acos(a
/2/abs(a))/2)))*re(sign(sin(acos(a/2/abs(a))/2)))^2+(-128*sqrt(3)*a^5+384*abs(a)*a^4+256*sqrt(3)*a^4*abs(a))*1
/2/sqrt(abs(a))*im(sign(sin(acos(a/2/abs(a))/2)))+1/8*(-320*sqrt(3)*a^5+192*a^4*sqrt(5*a^2+4*a*abs(a))-256*sqr
t(3)*a^4*abs(a))/sqrt(abs(a))*re(sign(cos(acos(a/2/abs(a))/2)))^3+(-72*a^4*abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2+4*
a*abs(a)))/sqrt(abs(a))*re(sign(cos(acos(a/2/abs(a))/2)))^2*re(sign(sin(acos(a/2/abs(a))/2)))-1/12*(-864*sqrt(
3)*a^5+864*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(abs(a))*re(sign(cos(acos(a/2/abs(a))/2)))*re(sign(sin(acos(a/2/abs
(a))/2)))^2+(128*sqrt(3)*a^5+384*abs(a)*a^4+256*sqrt(3)*a^4*abs(a))*1/2/sqrt(abs(a))*re(sign(cos(acos(a/2/abs(
a))/2)))-(32*a^5-40*a^4*abs(a)+8*sqrt(3)*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(abs(a))*re(sign(sin(acos(a/2/abs(a))
/2)))^3+(128*a^3*sqrt(abs(a))*abs(a)+64*sqrt(3)*a^4*sqrt(abs(a))-64*a^4*sqrt(abs(a)))*re(sign(sin(acos(a/2/abs
(a))/2))))/(256*a^3*sqrt(2*a^2+a*abs(a))*sqrt(3)*abs(a)-256*a^3*sqrt(2*a^2-a*abs(a))*sqrt(3)*abs(a))*ln(x^2-2*
sqrt((1+a*1/2/abs(a))/2)*sqrt(abs(a))*sign(cos(acos(a*1/2/abs(a))/2))*x+sqrt(abs(a))*sqrt(abs(a)))-(1/8*(-320*
sqrt(3)*a^5+192*a^4*sqrt(5*a^2+4*a*abs(a))-256*sqrt(3)*a^4*abs(a))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2
)))^3+(-72*a^4*abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))^2*
im(sign(sin(acos(a/2/abs(a))/2)))+(-96*a^5-120*a^4*abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*
im(sign(cos(acos(a/2/abs(a))/2)))^2*re(sign(cos(acos(a/2/abs(a))/2)))-1/12*(-864*sqrt(3)*a^5+864*a^4*sqrt(5*a^
2+4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))^2*re(sign(sin(acos(a/2/abs(a))/2)))-1/12*(-864*s
qrt(3)*a^5+864*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))*im(sign(sin(acos(a/2
/abs(a))/2)))^2-1/24*(-3456*sqrt(3)*a^5+3456*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs
(a))/2)))*im(sign(sin(acos(a/2/abs(a))/2)))*re(sign(cos(acos(a/2/abs(a))/2)))-(-144*a^4*abs(a)+48*sqrt(3)*a^4*
sqrt(5*a^2-4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))*im(sign(sin(acos(a/2/abs(a))/2)))*re(si
gn(sin(acos(a/2/abs(a))/2)))-1/24*(-2880*sqrt(3)*a^5+1728*a^4*sqrt(5*a^2+4*a*abs(a))-2304*sqrt(3)*a^4*abs(a))/
sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))*re(sign(cos(acos(a/2/abs(a))/2)))^2-(-144*a^4*abs(a)+48*sqrt(3)
*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))*re(sign(cos(acos(a/2/abs(a))/2)))*
re(sign(sin(acos(a/2/abs(a))/2)))+1/12*(-864*sqrt(3)*a^5+864*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(abs(a))*im(sign(
cos(acos(a/2/abs(a))/2)))*re(sign(sin(acos(a/2/abs(a))/2)))^2+(-128*sqrt(3)*a^5+384*abs(a)*a^4-256*sqrt(3)*a^4
*abs(a))*1/2/sqrt(abs(a))*im(sign(cos(acos(a/2/abs(a))/2)))-(32*a^5-40*a^4*abs(a)+8*sqrt(3)*a^4*sqrt(5*a^2-4*a
*abs(a)))/sqrt(abs(a))*im(sign(sin(acos(a/2/abs(a))/2)))^3-(-72*a^4*abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2-4*a*abs(a
)))/sqrt(abs(a))*im(sign(sin(acos(a/2/abs(a))/2)))^2*re(sign(cos(acos(a/2/abs(a))/2)))+1/24*(-2880*sqrt(3)*a^5
+1728*a^4*sqrt(5*a^2-4*a*abs(a))+2304*sqrt(3)*a^4*abs(a))/sqrt(abs(a))*im(sign(sin(acos(a/2/abs(a))/2)))^2*re(
sign(sin(acos(a/2/abs(a))/2)))-(-72*a^4*abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*im(sign(sin
(acos(a/2/abs(a))/2)))*re(sign(cos(acos(a/2/abs(a))/2)))^2+1/24*(-3456*sqrt(3)*a^5+3456*a^4*sqrt(5*a^2-4*a*abs
(a)))/sqrt(abs(a))*im(sign(sin(acos(a/2/abs(a))/2)))*re(sign(cos(acos(a/2/abs(a))/2)))*re(sign(sin(acos(a/2/ab
s(a))/2)))+(96*a^5-120*a^4*abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(abs(a))*im(sign(sin(acos(a/2/abs
(a))/2)))*re(sign(sin(acos(a/2/abs(a))/2)))^2+(64*sqrt(3)*a^5-128*a^5+64*a^4*abs(a))/sqrt(abs(a))*im(sign(sin(
acos(a/2/abs(a))/2)))-(-32*a^5-40*a^4*abs(a)+8*sqrt(3)*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*re(sign(cos(ac
os(a/2/abs(a))/2)))^3+1/12*(-864*sqrt(3)*a^5+864*a^4*sqrt(5*a^2+4*a*abs(a)))/sqrt(abs(a))*re(sign(cos(acos(a/2
/abs(a))/2)))^2*re(sign(sin(acos(a/2/abs(a))/2)))+(-72*a^4*abs(a)+24*sqrt(3)*a^4*sqrt(5*a^2-4*a*abs(a)))/sqrt(
abs(a))*re(sign(cos(acos(a/2/abs(a))/2)))*re(sign(sin(acos(a/2/abs(a))/2)))^2+(64*sqrt(3)*a^5-128*a^5-64*a^4*a
bs(a))/sqrt(abs(a))*re(sign(cos(acos(a/2/abs(a))/2)))-1/8*(-320*sqrt(3)*a^5+192*a^4*sqrt(5*a^2-4*a*abs(a))+256
*sqrt(3)*a^4*abs(a))/sqrt(abs(a))*re(sign(sin(acos(a/2/abs(a))/2)))^3+(-128*sqrt(3)*a^5+384*abs(a)*a^4+256*sqr
t(3)*a^4*abs(a))*1/2/sqrt(abs(a))*re(sign(sin(acos(a/2/abs(a))/2))))/(128*a^3*sqrt(2*a^2+a*abs(a))*sqrt(3)*abs
(a)-128*a^3*sqrt(2*a^2-a*abs(a))*sqrt(3)*abs(a))*atan((x-sign(cos(acos(a*1/2/abs(a))/2))*sqrt((1+a*1/2/abs(a))
/2)*sqrt(abs(a)))/sign(sin(acos(a*1/2/abs(a))/2))/sqrt((1-a*1/2/abs(a))/2)/sqrt(abs(a)))-(2*abs(a)*sqrt(abs(a)
)*a^2*cosh(im(acos(a/2/abs(a)))/2)*sin(re(acos(a/2/abs(a)))/2)-2*abs(a)*sqrt(abs(a))*a^2*sin(re(acos(a/2/abs(a
)))/2)*sinh(im(acos(a/2/abs(a)))/2)-3*a^2*sqrt(abs(a))*a*cos(re(acos(a/2/abs(a)))/2)^2*cosh(im(acos(a/2/abs(a)
))/2)^3*sin(re(acos(a/2/abs(a)))/2)+9*a^2*sqrt(abs(a))*a*cos(re(acos(a/2/abs(a)))/2)^2*cosh(im(acos(a/2/abs(a)
))/2)^2*sin(re(acos(a/2/abs(a)))/2)*sinh(im(acos(a/2/abs(a)))/2)-9*a^2*sqrt(abs(a))*a*cos(re(acos(a/2/abs(a)))
/2)^2*cosh(im(acos(a/2/abs(a)))/2)*sin(re(acos(a/2/abs(a)))/2)*sinh(im(acos(a/2/abs(a)))/2)^2+3*a^2*sqrt(abs(a
))*a*cos(re(acos(a/2/abs(a)))/2)^2*sin(re(acos(a/2/abs(a)))/2)*sinh(im(acos(a/2/abs(a)))/2)^3-2*sqrt(3)*a^2*sq
rt(abs(a))*a*cos(re(acos(a/2/abs(a)))/2)*cosh(im(acos(a/2/abs(a)))/2)+2*sqrt(3)*a^2*sqrt(abs(a))*a*cos(re(acos
(a/2/abs(a)))/2)*sinh(im(acos(a/2/abs(a)))/2)+a^2*sqrt(abs(a))*a*cosh(im(acos(a/2/abs(a)))/2)^3*sin(re(acos(a/
2/abs(a)))/2)^3-3*a^2*sqrt(abs(a))*a*cosh(im(acos(a/2/abs(a)))/2)^2*sin(re(acos(a/2/abs(a)))/2)^3*sinh(im(acos
(a/2/abs(a)))/2)+3*a^2*sqrt(abs(a))*a*cosh(im(acos(a/2/abs(a)))/2)*sin(re(acos(a/2/abs(a)))/2)^3*sinh(im(acos(
a/2/abs(a)))/2)^2-a^2*sqrt(abs(a))*a*sin(re(acos(a/2/abs(a)))/2)^3*sinh(im(acos(a/2/abs(a)))/2)^3+sqrt(3)*abs(
a)*a^2*sqrt(abs(a))*cos(re(acos(a/2/abs(a)))/2)^3*cosh(im(acos(a/2/abs(a)))/2)^3-3*sqrt(3)*abs(a)*a^2*sqrt(abs
(a))*cos(re(acos(a/2/abs(a)))/2)^3*cosh(im(acos(a/2/abs(a)))/2)^2*sinh(im(acos(a/2/abs(a)))/2)+3*sqrt(3)*abs(a
)*a^2*sqrt(abs(a))*cos(re(acos(a/2/abs(a)))/2)^3*cosh(im(acos(a/2/abs(a)))/2)*sinh(im(acos(a/2/abs(a)))/2)^2-s
qrt(3)*abs(a)*a^2*sqrt(abs(a))*cos(re(acos(a/2/abs(a)))/2)^3*sinh(im(acos(a/2/abs(a)))/2)^3-3*sqrt(3)*abs(a)*a
^2*sqrt(abs(a))*cos(re(acos(a/2/abs(a)))/2)*cosh(im(acos(a/2/abs(a)))/2)^3*sin(re(acos(a/2/abs(a)))/2)^2+9*sqr
t(3)*abs(a)*a^2*sqrt(abs(a))*cos(re(acos(a/2/abs(a)))/2)*cosh(im(acos(a/2/abs(a)))/2)^2*sin(re(acos(a/2/abs(a)
))/2)^2*sinh(im(acos(a/2/abs(a)))/2)-9*sqrt(3)*abs(a)*a^2*sqrt(abs(a))*cos(re(acos(a/2/abs(a)))/2)*cosh(im(aco
s(a/2/abs(a)))/2)*sin(re(acos(a/2/abs(a)))/2)^2*sinh(im(acos(a/2/abs(a)))/2)^2+3*sqrt(3)*abs(a)*a^2*sqrt(abs(a
))*cos(re(acos(a/2/abs(a)))/2)*sin(re(acos(a/2/abs(a)))/2)^2*sinh(im(acos(a/2/abs(a)))/2)^3)*1/4/sqrt(3)/a^4*l
n(x^2+2*sqrt(abs(a))*cos(acos(a*1/2/abs(a))/2)*x+sqrt(abs(a))*sqrt(abs(a)))+(2*abs(a)*sqrt(abs(a))*a^2*cos(re(
acos(a/2/abs(a)))/2)*cosh(im(acos(a/2/abs(a)))/2)-2*abs(a)*sqrt(abs(a))*a^2*cos(re(acos(a/2/abs(a)))/2)*sinh(i
m(acos(a/2/abs(a)))/2)-a^2*sqrt(abs(a))*a*cos(re(acos(a/2/abs(a)))/2)^3*cosh(im(acos(a/2/abs(a)))/2)^3+3*a^2*s
qrt(abs(a))*a*cos(re(acos(a/2/abs(a)))/2)^3*cosh(im(acos(a/2/abs(a)))/2)^2*sinh(im(acos(a/2/abs(a)))/2)-3*a^2*
sqrt(abs(a))*a*cos(re(acos(a/2/abs(a)))/2)^3*cosh(im(acos(a/2/abs(a)))/2)*sinh(im(acos(a/2/abs(a)))/2)^2+a^2*s
qrt(abs(a))*a*cos(re(acos(a/2/abs(a)))/2)^3*sinh(im(acos(a/2/abs(a)))/2)^3+3*a^2*sqrt(abs(a))*a*cos(re(acos(a/
2/abs(a)))/2)*cosh(im(acos(a/2/abs(a)))/2)^3*sin(re(acos(a/2/abs(a)))/2)^2-9*a^2*sqrt(abs(a))*a*cos(re(acos(a/
2/abs(a)))/2)*cosh(im(acos(a/2/abs(a)))/2)^2*sin(re(acos(a/2/abs(a)))/2)^2*sinh(im(acos(a/2/abs(a)))/2)+9*a^2*
sqrt(abs(a))*a*cos(re(acos(a/2/abs(a)))/2)*cosh(im(acos(a/2/abs(a)))/2)*sin(re(acos(a/2/abs(a)))/2)^2*sinh(im(
acos(a/2/abs(a)))/2)^2-3*a^2*sqrt(abs(a))*a*cos(re(acos(a/2/abs(a)))/2)*sin(re(acos(a/2/abs(a)))/2)^2*sinh(im(
acos(a/2/abs(a)))/2)^3+2*sqrt(3)*a^2*sqrt(abs(a))*a*cosh(im(acos(a/2/abs(a)))/2)*sin(re(acos(a/2/abs(a)))/2)-2
*sqrt(3)*a^2*sqrt(abs(a))*a*sin(re(acos(a/2/abs(a)))/2)*sinh(im(acos(a/2/abs(a)))/2)-3*sqrt(3)*abs(a)*a^2*sqrt
(abs(a))*cos(re(acos(a/2/abs(a)))/2)^2*cosh(im(acos(a/2/abs(a)))/2)^3*sin(re(acos(a/2/abs(a)))/2)+9*sqrt(3)*ab
s(a)*a^2*sqrt(abs(a))*cos(re(acos(a/2/abs(a)))/2)^2*cosh(im(acos(a/2/abs(a)))/2)^2*sin(re(acos(a/2/abs(a)))/2)
*sinh(im(acos(a/2/abs(a)))/2)-9*sqrt(3)*abs(a)*a^2*sqrt(abs(a))*cos(re(acos(a/2/abs(a)))/2)^2*cosh(im(acos(a/2
/abs(a)))/2)*sin(re(acos(a/2/abs(a)))/2)*sinh(im(acos(a/2/abs(a)))/2)^2+3*sqrt(3)*abs(a)*a^2*sqrt(abs(a))*cos(
re(acos(a/2/abs(a)))/2)^2*sin(re(acos(a/2/abs(a)))/2)*sinh(im(acos(a/2/abs(a)))/2)^3+sqrt(3)*abs(a)*a^2*sqrt(a
bs(a))*cosh(im(acos(a/2/abs(a)))/2)^3*sin(re(acos(a/2/abs(a)))/2)^3-3*sqrt(3)*abs(a)*a^2*sqrt(abs(a))*cosh(im(
acos(a/2/abs(a)))/2)^2*sin(re(acos(a/2/abs(a)))/2)^3*sinh(im(acos(a/2/abs(a)))/2)+3*sqrt(3)*abs(a)*a^2*sqrt(ab
s(a))*cosh(im(acos(a/2/abs(a)))/2)*sin(re(acos(a/2/abs(a)))/2)^3*sinh(im(acos(a/2/abs(a)))/2)^2-sqrt(3)*abs(a)
*a^2*sqrt(abs(a))*sin(re(acos(a/2/abs(a)))/2)^3*sinh(im(acos(a/2/abs(a)))/2)^3)*1/2/sqrt(3)/a^4*atan((x+cos(ac
os(a*1/2/abs(a))/2)*sqrt(abs(a)))/sin(acos(a*1/2/abs(a))/2)/sqrt(abs(a)))
________________________________________________________________________________________
maple [A] time = 0.04, size = 92, normalized size = 0.81 \[ \frac {\arctan \left (\frac {2 x +\sqrt {3}\, \sqrt {a}}{\sqrt {a}}\right )}{2 \sqrt {a}}-\frac {\arctan \left (\frac {-2 x +\sqrt {3}\, \sqrt {a}}{\sqrt {a}}\right )}{2 \sqrt {a}}+\frac {\sqrt {3}\, \ln \left (x^{2}+\sqrt {3}\, \sqrt {a}\, x +a \right )}{4 \sqrt {a}}-\frac {\sqrt {3}\, \ln \left (-x^{2}+\sqrt {3}\, \sqrt {a}\, x -a \right )}{4 \sqrt {a}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((-x^2+2*a)/(x^4-a*x^2+a^2),x)
[Out]
-1/4/a^(1/2)*3^(1/2)*ln(x*3^(1/2)*a^(1/2)-x^2-a)-1/2/a^(1/2)*arctan((3^(1/2)*a^(1/2)-2*x)/a^(1/2))+1/4*ln(a+x^
2+x*3^(1/2)*a^(1/2))*3^(1/2)/a^(1/2)+1/2/a^(1/2)*arctan((2*x+3^(1/2)*a^(1/2))/a^(1/2))
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ -\int \frac {x^{2} - 2 \, a}{x^{4} - a x^{2} + a^{2}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((-x^2+2*a)/(x^4-a*x^2+a^2),x, algorithm="maxima")
[Out]
-integrate((x^2 - 2*a)/(x^4 - a*x^2 + a^2), x)
________________________________________________________________________________________
mupad [B] time = 4.48, size = 133, normalized size = 1.17 \[ -\frac {\sqrt {8}\,\mathrm {atan}\left (x\,\sqrt {\frac {1}{8\,a}+\frac {\sqrt {3}\,1{}\mathrm {i}}{8\,a}}\,1{}\mathrm {i}+\sqrt {3}\,x\,\sqrt {\frac {1}{8\,a}+\frac {\sqrt {3}\,1{}\mathrm {i}}{8\,a}}\right )\,\sqrt {\frac {1+\sqrt {3}\,1{}\mathrm {i}}{a}}\,1{}\mathrm {i}}{4}-\frac {\sqrt {8}\,\mathrm {atan}\left (x\,\sqrt {\frac {1}{8\,a}-\frac {\sqrt {3}\,1{}\mathrm {i}}{8\,a}}\,1{}\mathrm {i}-\sqrt {3}\,x\,\sqrt {\frac {1}{8\,a}-\frac {\sqrt {3}\,1{}\mathrm {i}}{8\,a}}\right )\,\sqrt {-\frac {-1+\sqrt {3}\,1{}\mathrm {i}}{a}}\,1{}\mathrm {i}}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((2*a - x^2)/(a^2 - a*x^2 + x^4),x)
[Out]
- (8^(1/2)*atan(x*((3^(1/2)*1i)/(8*a) + 1/(8*a))^(1/2)*1i + 3^(1/2)*x*((3^(1/2)*1i)/(8*a) + 1/(8*a))^(1/2))*((
3^(1/2)*1i + 1)/a)^(1/2)*1i)/4 - (8^(1/2)*atan(x*(1/(8*a) - (3^(1/2)*1i)/(8*a))^(1/2)*1i - 3^(1/2)*x*(1/(8*a)
- (3^(1/2)*1i)/(8*a))^(1/2))*(-(3^(1/2)*1i - 1)/a)^(1/2)*1i)/4
________________________________________________________________________________________
sympy [A] time = 0.25, size = 27, normalized size = 0.24 \[ - \operatorname {RootSum} {\left (16 t^{4} a^{2} - 4 t^{2} a + 1, \left (t \mapsto t \log {\left (- 2 t a + x \right )} \right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((-x**2+2*a)/(x**4-a*x**2+a**2),x)
[Out]
-RootSum(16*_t**4*a**2 - 4*_t**2*a + 1, Lambda(_t, _t*log(-2*_t*a + x)))
________________________________________________________________________________________